.class public Lcom/estrongs/android/pop/utils/s;
.super Ljava/lang/Object;
.source "RecycleUtil.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/utils/s$a;
    }
.end annotation


# static fields
.field static a:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/lang/Boolean;",
            ">;"
        }
    .end annotation
.end field

.field static b:Ljava/util/LinkedList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/LinkedList<",
            "Lcom/estrongs/android/pop/utils/s$a;",
            ">;"
        }
    .end annotation
.end field

.field public static c:I

.field public static d:I

.field public static e:I

.field public static f:I

.field public static g:I

.field public static h:I

.field public static i:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/utils/s;->a:Ljava/util/HashMap;

    .line 2
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/utils/s;->b:Ljava/util/LinkedList;

    const/4 v0, 0x0

    .line 3
    sput v0, Lcom/estrongs/android/pop/utils/s;->c:I

    const/4 v0, 0x1

    .line 4
    sput v0, Lcom/estrongs/android/pop/utils/s;->d:I

    const/4 v0, 0x2

    .line 5
    sput v0, Lcom/estrongs/android/pop/utils/s;->e:I

    const/4 v0, 0x3

    .line 6
    sput v0, Lcom/estrongs/android/pop/utils/s;->f:I

    const/4 v0, 0x4

    .line 7
    sput v0, Lcom/estrongs/android/pop/utils/s;->g:I

    const/4 v0, 0x5

    .line 8
    sput v0, Lcom/estrongs/android/pop/utils/s;->h:I

    const/4 v0, 0x6

    .line 9
    sput v0, Lcom/estrongs/android/pop/utils/s;->i:I

    return-void
.end method

.method protected static a(Ljava/lang/String;)I
    .locals 8

    const-string v0, ")"

    const-string v1, "("

    .line 1
    invoke-static {p0}, Lcom/estrongs/android/util/h0;->B(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_0

    .line 2
    sget p0, Lcom/estrongs/android/pop/utils/s;->f:I

    return p0

    :cond_0
    const-string v3, "/.estrongs"

    .line 3
    invoke-virtual {p0, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_1

    const-string v3, "/.estrongs/"

    invoke-virtual {p0, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 4
    :cond_1
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->v(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 5
    invoke-static {p0, v3}, Lcom/estrongs/android/util/h0;->i(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 6
    sget p0, Lcom/estrongs/android/pop/utils/s;->g:I

    return p0

    :cond_2
    const-string v3, "/.estrongs/recycle/"

    .line 7
    invoke-virtual {p0, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_3

    const-string v4, "/.estrongs/recycle"

    invoke-virtual {p0, v4}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_4

    .line 8
    :cond_3
    invoke-static {v2}, Lcom/estrongs/android/util/h0;->Z(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 9
    invoke-static {p0, v4}, Lcom/estrongs/android/util/h0;->i(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_4

    .line 10
    sget p0, Lcom/estrongs/android/pop/utils/s;->h:I

    return p0

    .line 11
    :cond_4
    invoke-virtual {p0, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_5

    .line 12
    invoke-static {p0}, Lcom/estrongs/android/util/h0;->K1(Ljava/lang/String;)Z

    move-result p0

    if-eqz p0, :cond_5

    .line 13
    sget p0, Lcom/estrongs/android/pop/utils/s;->i:I

    return p0

    :cond_5
    const-string p0, "/"

    .line 14
    invoke-virtual {v2, p0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_6

    .line 15
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 16
    :cond_6
    sget-object p0, Lcom/estrongs/android/pop/utils/s;->a:Ljava/util/HashMap;

    invoke-virtual {p0, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Ljava/lang/Boolean;

    if-nez p0, :cond_9

    .line 17
    new-instance p0, Ljava/lang/StringBuilder;

    invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "/.es_recycle_test____"

    invoke-virtual {p0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    invoke-virtual {p0, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    const/4 v3, 0x0

    .line 18
    :try_start_0
    new-instance v4, Ljava/io/File;

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const/4 v6, 0x1

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const/4 v5, 0x1

    .line 19
    :goto_0
    invoke-virtual {v4}, Ljava/io/File;->exists()Z

    move-result v7

    if-eqz v7, :cond_7

    add-int/2addr v5, v6

    .line 20
    new-instance v4, Ljava/io/File;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-direct {v4, v7}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    goto :goto_0

    .line 21
    :cond_7
    invoke-virtual {v4}, Ljava/io/File;->createNewFile()Z

    move-result p0

    if-eqz p0, :cond_8

    .line 22
    new-instance p0, Ljava/lang/Boolean;

    invoke-direct {p0, v6}, Ljava/lang/Boolean;-><init>(Z)V

    .line 23
    invoke-virtual {v4}, Ljava/io/File;->delete()Z

    goto :goto_1

    .line 24
    :cond_8
    new-instance p0, Ljava/lang/Boolean;

    invoke-direct {p0, v3}, Ljava/lang/Boolean;-><init>(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 25
    :catch_0
    new-instance p0, Ljava/lang/Boolean;

    invoke-direct {p0, v3}, Ljava/lang/Boolean;-><init>(Z)V

    .line 26
    :goto_1
    sget-object v0, Lcom/estrongs/android/pop/utils/s;->a:Ljava/util/HashMap;

    invoke-virtual {v0, v2, p0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 27
    :cond_9
    invoke-virtual {p0}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p0

    if-eqz p0, :cond_a

    .line 28
    sget p0, Lcom/estrongs/android/pop/utils/s;->c:I

    return p0

    .line 29
    :cond_a
    sget p0, Lcom/estrongs/android/pop/utils/s;->e:I

    return p0
.end method

.method private static a(Ljava/lang/String;I)V
    .locals 4

    const-string v0, "/"

    .line 30
    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 31
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    add-int/lit8 v1, v1, -0x2

    if-gez v1, :cond_0

    return-void

    .line 32
    :cond_0
    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;I)I

    move-result v1

    goto :goto_0

    .line 33
    :cond_1
    invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I

    move-result v1

    :goto_0
    const/4 v2, -0x1

    if-ne v1, v2, :cond_2

    return-void

    .line 34
    :cond_2
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const/4 v3, 0x0

    invoke-virtual {p0, v3, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p0

    invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    .line 35
    new-instance v0, Lcom/estrongs/android/pop/utils/s$a;

    invoke-direct {v0}, Lcom/estrongs/android/pop/utils/s$a;-><init>()V

    .line 36
    iput-object p0, v0, Lcom/estrongs/android/pop/utils/s$a;->a:Ljava/lang/String;

    .line 37
    iput p1, v0, Lcom/estrongs/android/pop/utils/s$a;->b:I

    .line 38
    sget-object p0, Lcom/estrongs/android/pop/utils/s;->b:Ljava/util/LinkedList;

    invoke-virtual {p0, v0}, Ljava/util/LinkedList;->addFirst(Ljava/lang/Object;)V

    .line 39
    sget-object p0, Lcom/estrongs/android/pop/utils/s;->b:Ljava/util/LinkedList;

    invoke-virtual {p0}, Ljava/util/LinkedList;->size()I

    move-result p0

    const/4 p1, 0x5

    if-le p0, p1, :cond_3

    .line 40
    sget-object p0, Lcom/estrongs/android/pop/utils/s;->b:Ljava/util/LinkedList;

    invoke-virtual {p0}, Ljava/util/LinkedList;->removeLast()Ljava/lang/Object;

    :cond_3
    return-void
.end method

.method public static b(Ljava/lang/String;)I
    .locals 3

    .line 1
    invoke-static {p0}, Lcom/estrongs/android/util/h0;->Y1(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 2
    sget p0, Lcom/estrongs/android/pop/utils/s;->d:I

    return p0

    .line 3
    :cond_0
    invoke-static {p0}, Lcom/estrongs/android/util/h0;->i1(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 4
    sget p0, Lcom/estrongs/android/pop/utils/s;->e:I

    return p0

    .line 5
    :cond_1
    invoke-static {p0}, Lcom/estrongs/android/util/h0;->c1(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-static {}, Lcom/estrongs/android/pop/k;->b()I

    move-result v0

    const/16 v1, 0x15

    if-lt v0, v1, :cond_2

    .line 6
    sget p0, Lcom/estrongs/android/pop/utils/s;->e:I

    return p0

    :cond_2
    const-string v0, "/.estrongs"

    .line 7
    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_4

    const-string v0, "/.estrongs/"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_4

    const-string v0, "/.estrongs/recycle/"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_4

    const-string v0, "/.estrongs/recycle"

    invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_4

    .line 8
    sget-object v0, Lcom/estrongs/android/pop/utils/s;->b:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_3
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_4

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/estrongs/android/pop/utils/s$a;

    .line 9
    iget-object v2, v1, Lcom/estrongs/android/pop/utils/s$a;->a:Ljava/lang/String;

    invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_3

    .line 10
    iget p0, v1, Lcom/estrongs/android/pop/utils/s$a;->b:I

    return p0

    .line 11
    :cond_4
    invoke-static {p0}, Lcom/estrongs/android/pop/utils/s;->a(Ljava/lang/String;)I

    move-result v0

    .line 12
    sget v1, Lcom/estrongs/android/pop/utils/s;->g:I

    if-eq v0, v1, :cond_5

    sget v1, Lcom/estrongs/android/pop/utils/s;->h:I

    if-eq v0, v1, :cond_5

    sget v1, Lcom/estrongs/android/pop/utils/s;->i:I

    if-eq v0, v1, :cond_5

    .line 13
    invoke-static {p0, v0}, Lcom/estrongs/android/pop/utils/s;->a(Ljava/lang/String;I)V

    :cond_5
    return v0
.end method
